package com.yingxin.yxerp.module.common;

public enum FinishBusinessType {

    CGHT("CGHT", "采购合同"),
    DGHT("DGHT", "代工合同"),
    XSHT("XSHT", "销售合同"),
    BPCG("BPCG", "备品采购单"),
    BPWX("BPWX", "备品维修单"),
    QTHT("QTHT", "其他合同"),
    ZHFK("ZHFK", "综合付款申请"),
    BPCGZLCLSQ("BPCGZLCLSQ", "备件采购质量处理申请"),
    GCSB("GCSB", "工程申报"),
    ;

    private String type;

    private String typeName;

    FinishBusinessType(String type, String typeName) {
        this.type = type;
        this.typeName = typeName;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public static FinishBusinessType getEnum(String type) {
        if (type == null) {
            return null;
        }
        for (FinishBusinessType t : FinishBusinessType.values()) {
            if (t.getType().equals(type)) {
                return t;
            }
        }
        return null;
    }

}
